<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>课堂作业2</title>
</head>
<body>
    
</body>
<script>
    var arr = [2,4,6,8,7,9];
    //2.在arr3中找出所有的偶数。
    var result = arr.filter(function (item){
        return item % 2 ===0
    })
    console.log(result);
</script>
</html>